package com.exam.role.dao.impl;

import java.util.List;

import com.exam.base.dao.BaseDao;
import com.exam.role.dao.StudentDao;
import com.exam.role.model.Student;

public class StudentDaoImpl extends BaseDao<Student> implements StudentDao {

	@Override
	public Student getStudent(String userName) {
		List<Student> list = this.findByHql(
				" from Student s where s.uname = ?", new Object[] { userName });
		if (list != null && list.size() > 0) {
			return (Student) list.get(0);
		}
		return null;
	}

}
